package cn.kkdlk.generate.dxf.model.support;

import lombok.Data;

/**
 * org.enhance.dxf.model.support-DxfExtent
 *
 * @classname: DxfExtent
 * @description: 对角线两点坐标
 * @author: YTZJJ
 * @date: 2023-10-20
 **/
@Data
public class DxfExtent {
    private double x1;
    private double y1;
    private double x2;
    private double y2;
    private String centerX;
    private String centerY;
    private String height;

    public DxfExtent(double x1, double y1, double x2, double y2) {
        this.x1 = x1;
        this.y1 = y1;
        this.x2 = x2;
        this.y2 = y2;
        double d = 114.145;
        this.centerX = String.format("%.9f", (x1 + x2) / 2);
        this.centerY = String.format("%.9f", (y1 + y2) / 2);
        this.height = String.format("%.9f", (y2 - y1) * 1.2);
    }
}
